﻿<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net">
  <description>Deletes a file first then creates it</description>

  <import resource="MyAliases.xml"/>
  <object id="MacroToProcess" type="Macro" >
    <constructor-arg name="templateId" value="1C420832-0A41-4f65-87C6-1B62E84DF536"/>
    <constructor-arg name="actions">
      <list element-type="IAction">

        <!-- Delete the file -->
        <object id="DeleteFileTest" type="Action.ExpressionAction" >
          <property name="EntityList" ref="props"/>
        </object>
       
      </list>
    </constructor-arg>
  </object>

  <!-- A File Entity-->
  <object id="props" type="Entity.ExpressionProperties">
    
    <!-- how to deal with nulls (notice the custom function I added -->
    <property name="NullBool1" expression="Func.Eval('${NullBool1}')" />

    <!-- how to deal with nulls (notice the custom function I added -->
    <property name="BoolWithValue" expression="Func.Eval('${BoolWithValue}')" />

    <!-- how to deal with Strings - this has an actual value -->
    <property name="String1" expression="Func.Eval('${String1}')" />

    <!-- You can pass in a string via a place holder -->
    <property name="String2" expression="Func.Eval('${String2}')" />

    <!-- You can pass in a string direct for ease of use -->
    <property name="String3" expression="Func.Eval('Mark Jones')" />

    <!-- You can also pass in a literal string (not using Func.Eval) -->
    <property name="String4" expression="'Mark Jones'" />

    <!-- You can pass in multiple Exressions  -->
    <property name="MultipleExpressions1" expression="Func.Eval('${MultipleExpressions1}')" />

    <property name="MultipleExpressions2" expression="Func.Eval('$[1==1] $[DateTime.Today]')" />
    
    <!-- how to deal with Dates... -->
    <property name="DateTime1" expression="Func.Eval('$[${DateTime1}]')" />

  </object>

</objects>

